package com.mccken.designpattern.strategy;

/**
 * @program: mccken-collect
 * @description:
 * @author: mccken
 * @create: 2022-09-19 11:18
 **/
public class StrategyPatternDemo {

	public static void main(String[] args) {
		Context context = new Context(new OperationAdd());
		System.out.println(context.executeStrategy(10,5));
		
		context = new Context(new OperationSubtract());
		System.out.println(context.executeStrategy(10,5));
		
		context = new Context(new OperationMultiply());
		System.out.println(context.executeStrategy(10,5));		
	}
}
